<template>
	<view class="con">
		<view class="main">
			<view class="main_v1">{{title}}</view>
			<!-- <image class="main_v2" mode="widthFix" src="/static/index/img10.png"></image> -->
			<!-- <view class="main_v3"><rich-text :nodes="XyInfo.content"></rich-text></view> -->
      <view class="main_v3">
      <!--  <u-parse :content="XyInfo.content" @preview="preview" ></u-parse> -->
        <mp-html :content="XyInfo.content" />
      </view>
		</view>
	</view>
</template>

<script>
  import {
    getXyInfo, //获取协议
  } from '@/request/api.js'
    import uParse from '@/components/u-parse/u-parse.vue'
	export default {
		data() {
			return {
				tag:'',
        title:'',
        XyInfo:{} //返回内容
			};
		},
    onLoad(options) {
      console.log('单页-接收参数')
      console.log(options)
      this.tag = options.tag
      this.title = options.title
      // this.getXyInfoFun() //获取协议
      uni.setNavigationBarTitle({
        title: options.title// 新标题内容
      });
    },
    onShow() {
      this.getXyInfoFun() //获取协议
    },
    methods:{
      getXyInfoFun(){
        getXyInfo(this.tag).then(res=>{
          console.log('获取协议')
          console.log(res)
          this.XyInfo = res.data
        })
      }
    }
	}
</script>

<style scoped lang="scss">
.main{
	// padding: 30rpx;
	width: 100%;
	box-sizing: border-box;
	height: auto;
	.main_v1{
		line-height: 58rpx;
		color: rgba(16,16,16,1);
		font-size: 48rpx;
		margin-bottom: 60rpx;
	}
	.main_v2{
		display: block;
		width: 100%;
		height: auto;
		margin-bottom: 36rpx;
	}
	.main_v3{
		width: 100%;
		line-height: 40rpx;
		color: rgba(16,16,16,1);
		font-size: 28rpx;
    /deep/ image{
      display: block !important;
       width: 100% !important;
       margin-bottom: 10rpx !important;
    }
	}
}
</style>
